package interview.huawei;

public class LinkedList<T> {
    private Node<T> head;

    public boolean hasLoop() {
        Node fast = head;
        Node slow = head.next;
        while (null != fast && null != slow && fast != slow) {
            fast = fast.next.next;
            slow = slow.next;
        }
        return (fast == slow);
    }
}
